﻿using StructureMap.Configuration.DSL;
using ZSoft.Telegram.DataAccess;
using ZSoft.Telegram.DataAccess.Abstractions;
using ZSoft.Telegram.Domain;
using ZSoft.Telegram.Services;
using ZSoft.Telegram.Services.Abstraction;

namespace ZSoft.Telegram.UI.Web.Infrastructure.IOC.Registries
{
    public class CategoryServiceRegistry: Registry
    {
        public CategoryServiceRegistry()
        {
            this.For(typeof(ICategoryService))
                  .Use(typeof(CategoryService))
                    .Ctor<IRepository<Category>>().Is(new SqlRepository<Category>(new ApplicationDbContext()));
        }
    }
}
